xen.git
20 years agoNew 'network-bridge' script that uses ifdown/ifup to configure the interface rather...
iap10@freefall.cl.cam.ac.uk [Sat, 13 Aug 2005 22:02:54 +0000 (22:02 +0000)]
New 'network-bridge' script that uses ifdown/ifup to configure the interface rather than trying to transfer addresses and routes. (Suggested by Gerd Knorr)

Although Li Ge has had problems with this script he had trouble with the previous too. I think this new one should work for more people, particularly those using DHCP on their primary dom0 interface.

Debugging is currently enabled ("sh -x") so a log of the script's execution is output to /var/log/xend.log

Signed-off-by: ian@xensource.com
--HG--
rename : tools/examples/network => tools/examples/network-bridge

20 years agoAdd "set_pte_at_sync" (integrated invlpg) in Linux i386/mm/highmem.c to improve perfo...
iap10@freefall.cl.cam.ac.uk [Sat, 13 Aug 2005 21:52:46 +0000 (21:52 +0000)]
Add "set_pte_at_sync" (integrated invlpg) in Linux i386/mm/highmem.c to improve performance for domains with >900MB of memory.

Signed-off-by: ian@xensource.com
20 years agoOptimize the Linux arch xen implementation of "set_pte_at".
iap10@freefall.cl.cam.ac.uk [Sat, 13 Aug 2005 21:26:49 +0000 (21:26 +0000)]
Optimize the Linux arch xen implementation of "set_pte_at".
Signed-off-by: ian@xensource.com
20 years agoI missed a couple of files out of the patch to wrap calls to update_va_mapping with...
iap10@freefall.cl.cam.ac.uk [Sat, 13 Aug 2005 21:01:35 +0000 (21:01 +0000)]
I missed a couple of files out of the patch to wrap calls to update_va_mapping with BUG_ON(). [We really need an equivalent of 'citool' for mercurial...]
Signed-off-by: ian@xensource.com
20 years agoAdd some profiling support for writeable pagetables.
iap10@freefall.cl.cam.ac.uk [Sat, 13 Aug 2005 20:47:47 +0000 (20:47 +0000)]
Add some profiling support for writeable pagetables.

Signed-off-by: ian@xensource.com
20 years agoRemove the BUG() from HYPERVISOR_update_va_mapping and change all the appropriate...
iap10@freefall.cl.cam.ac.uk [Fri, 12 Aug 2005 16:05:37 +0000 (16:05 +0000)]
Remove the BUG() from HYPERVISOR_update_va_mapping and change all the appropriate callers to wrap in BUG_ON()

Signed-off-by: ian@xensource.com
20 years agoThis patch fixes "xm reboot" command.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 22:18:27 +0000 (22:18 +0000)]
This patch fixes "xm reboot" command.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
20 years agodomU always reports an error "Ignoring shutdown request: -1" when we
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 22:18:02 +0000 (22:18 +0000)]
domU always reports an error "Ignoring shutdown request: -1" when we
shutdown it from dom0 (using "xm shutdown" command). This patch fixes
it.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
20 years agoMemory leak in xc_linux_save, and uninitialised var
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 22:12:11 +0000 (22:12 +0000)]
Memory leak in xc_linux_save, and uninitialised var
in secpol_tool.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
20 years agoFix loop iterator aliasing in x86/32 memory initialisation.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:52:22 +0000 (21:52 +0000)]
Fix loop iterator aliasing in x86/32 memory initialisation.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
20 years agoSupport VCPU migration for VMX guests.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:38:58 +0000 (21:38 +0000)]
Support VCPU migration for VMX guests.

Add a hook to support CPU migration for VMX domains

Reorganize the low level asm code to support relaunching a VMCS on a different
logical CPU.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoFix getdomaininfo for vmx guests.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:19:45 +0000 (21:19 +0000)]
Fix getdomaininfo for vmx guests.
Replaces Intel patch [14/15].
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove arch/xen/x86_64/kernel/init_task.c from sparse tree. It's
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:09:06 +0000 (21:09 +0000)]
Remove arch/xen/x86_64/kernel/init_task.c from sparse tree.  It's
identical to the base file, and already marked as a c-link.

Signed-off-by: Chris Wright <chrisw@osdl.org>
20 years agoA simple make ARCH=xen clean && make ARCH=xen vmlinuz will fail because
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:08:51 +0000 (21:08 +0000)]
A simple make ARCH=xen clean && make ARCH=xen vmlinuz will fail because
arch/xen/x86_64/kernel/pci-nommu.c and arch/xen/x86_64/kernel/pci-dma.c
symlinks get removed and relinked to base implementation.  Make these non
c-obj's to preserve sparse tree links.

Signed-off-by: Chris Wright <chrisw@osdl.org>
20 years agoChange vpit->period and friends to count in nanoseconds.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:07:17 +0000 (21:07 +0000)]
Change vpit->period and friends to count in nanoseconds.

This actually reduces the amount of 64 bit math we need to do.

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoImplement event filtering command line options for xentrace.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:06:35 +0000 (21:06 +0000)]
Implement event filtering command line options for xentrace.

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoWhen the guest shuts down a VM, make sure that the domain gets destroyed.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:06:15 +0000 (21:06 +0000)]
When the guest shuts down a VM, make sure that the domain gets destroyed.

Device model needs to do xm destroy before it exits on
guest shutdown/poweroff/halt -p.

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years ago[ We'll try to get in a proper fix into 3.0 - this is just the backup plan]
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:05:58 +0000 (21:05 +0000)]
[ We'll try to get in a proper fix into 3.0 - this is just the backup plan]

Don't attempt to create paravirtualized devices for VMX domains for now.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoFix comments about the localtime option.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:05:21 +0000 (21:05 +0000)]
Fix comments about the localtime option.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoClean up unused junk in xemexample.vmx
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:04:35 +0000 (21:04 +0000)]
Clean up unused junk in xemexample.vmx

Signed-off-by: YongKang You <yongkang.you@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoNeed to reset device model pid on reboot
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:04:17 +0000 (21:04 +0000)]
Need to reset device model pid on reboot

Without this, xend will not spawn a new device model process after the reboot.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoSupport rebooting VMX domains
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:03:16 +0000 (21:03 +0000)]
Support rebooting VMX domains

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoHandle VMX domains correctly across xend restarts
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:02:51 +0000 (21:02 +0000)]
Handle VMX domains correctly across xend restarts

This patch remembers the device model pid across xend restarts and
avoids creating duplicate device model processes.

Also, device models don't inherit socket fds from xend (which are closed
on exec now), which used to prevent xend restarting.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoSeparate out VMCS host state initialization from the rest
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:01:36 +0000 (21:01 +0000)]
Separate out VMCS host state initialization from the rest

This is needed to support virtual cpu migration, because the host state
initialization is done on every migration, but the rest of the initialization
is done once per vcpu.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoImproved error reporting on vmlaunch/vmresume failure.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 21:01:10 +0000 (21:01 +0000)]
Improved error reporting on vmlaunch/vmresume failure.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoFix config file parsing for VMX domains.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 20:58:08 +0000 (20:58 +0000)]
Fix config file parsing for VMX domains.

If we define "vif" in the config file, image.py will raise error "vmx:
missing vbd configuration". The reason is "vif" is dealt with as a "vbd"
device.

This patch fixes this issue by dealing with "vbd" and "vif " separately,
removing "macaddr" arg and parsing mac address from "vif" instead.

Also, the vbd doesn't have to be a file anymore, but can be a physical
disk partition.

Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
20 years agoThis patch addresses Rustys' [1]suggestions. Most visibly:
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 20:57:09 +0000 (20:57 +0000)]
This patch addresses Rustys' [1]suggestions.  Most visibly:

Entries in the store:
/cpus/cpuX/online -> /cpu/X/availability

Values:
0|1 -> online|offline

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoFix handling of memory holes for Xen heap and domain 0
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 18:03:22 +0000 (18:03 +0000)]
Fix handling of memory holes for Xen heap and domain 0
kernel image and ramdisk.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up event-channel notification code in Xen.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 16:48:36 +0000 (16:48 +0000)]
Clean up event-channel notification code in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix where "!" operator used in Bitwise operation.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 16:23:54 +0000 (16:23 +0000)]
Fix where "!" operator used in Bitwise operation.

In IBM we have an internal source code scanner called BEAM. We have run
it against Xen and here are some of the results.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
20 years agoMore time fixes. Now time is set properly in domU's, and
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 13:07:08 +0000 (13:07 +0000)]
More time fixes. Now time is set properly in domU's, and
settimeofday() is simplified and fixed.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdded support for abbreviated xm sub commands
twilkie@paploo.uk.xensource.com [Thu, 11 Aug 2005 12:06:32 +0000 (12:06 +0000)]
Added support for abbreviated xm sub commands

20 years agoPAE page directories must be below 4GB. Based on a patch
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 10:34:32 +0000 (10:34 +0000)]
PAE page directories must be below 4GB. Based on a patch
from Gerd Knorr.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe following patch provides x86_64 SMP support for xen linux. Many,
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 08:59:47 +0000 (08:59 +0000)]
The following patch provides x86_64 SMP support for xen linux.  Many,
many thanks to the help for bug fixes, cleanups, good domU support,
and more from Jun and Xin.  I've tested this on a couple different
machines, and made sure the UP build still boots and works.  dom0 and
domU smp both work.  There's still some cleanups to do, but we'd prefer
to do the last bit in tree.  This doesn't update defconfigs just yet.
That'll be a follow-on patch shortly, so for now, you'll have to manually
enable CONFIG_SMP if you'd like to test.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoSince Xend doesn't use twisted anymore, remove the references from the
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 08:58:40 +0000 (08:58 +0000)]
Since Xend doesn't use twisted anymore, remove the references from the
Makefile.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
20 years agoRemove qemu-vgaram-bin. It's not used any more.
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 08:57:48 +0000 (08:57 +0000)]
Remove qemu-vgaram-bin. It's not used any more.

20 years agoThe attached patch fixes the xm list command, which very
kaf24@firebug.cl.cam.ac.uk [Thu, 11 Aug 2005 08:55:47 +0000 (08:55 +0000)]
The attached patch fixes the xm list command, which very
recently stopped working if security was enabled.

xm list fails if security is enabled because of a single
additional "%" character in a print.

Signed-off-by: Reiner Sailer <sailer@watson.ibm.com>
20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 21:55:36 +0000 (21:55 +0000)]
merge?

20 years agoEnable reiserfs in x86_64 domU kernel
iap10@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 17:48:03 +0000 (17:48 +0000)]
Enable reiserfs in x86_64 domU kernel

Signed-off-by: ian@xensource.com
20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 17:06:29 +0000 (17:06 +0000)]
merge?

20 years agoInstall libxenstore in /usr/lib64 for 64 bit builds
iap10@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 16:52:03 +0000 (16:52 +0000)]
Install libxenstore in /usr/lib64 for 64 bit builds
Signed-off-by: ian@xensource.com
20 years agoMake xenconsole more friendly when invoked directly.
cl349@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 16:47:07 +0000 (16:47 +0000)]
Make xenconsole more friendly when invoked directly.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoSmall time fixes.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 16:03:31 +0000 (16:03 +0000)]
Small time fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix wallclock initialisation in domain0.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 15:14:50 +0000 (15:14 +0000)]
Fix wallclock initialisation in domain0.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix domain0 builder for PAE.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 14:11:40 +0000 (14:11 +0000)]
Fix domain0 builder for PAE.
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix 64-bit __get_user() on 32-bit x86. Needed for PAE.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 13:06:00 +0000 (13:06 +0000)]
Fix 64-bit __get_user() on 32-bit x86. Needed for PAE.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix stupid typo in previous checkin (stopped time.c
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 13:05:22 +0000 (13:05 +0000)]
Fix stupid typo in previous checkin (stopped time.c
from compiling on 32-bit x86).

20 years agoFix time handling on x86/64.
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 12:56:47 +0000 (12:56 +0000)]
Fix time handling on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix simple index error in error handling. Now reports correct domain name in error...
twilkie@paploo.uk.xensource.com [Wed, 10 Aug 2005 12:21:39 +0000 (12:21 +0000)]
Fix simple index error in error handling.  Now reports correct domain name in error message.

20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 09:50:15 +0000 (09:50 +0000)]
merge

20 years agodma_map_single can't sleep since it may be called with locks held, or
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 09:50:05 +0000 (09:50 +0000)]
dma_map_single can't sleep since it may be called with locks held, or
interrupts off, etc.   Thus it shouldn't make sleeping allocations.

Signed-off-by: Chris Wright <chrisw@osdl.org>
20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 09:47:13 +0000 (09:47 +0000)]
merge?

20 years agoMake xen daemon startup more robust.
cl349@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 09:46:51 +0000 (09:46 +0000)]
Make xen daemon startup more robust.
1) make xenconsoled exit gracefully if xcs dies
2) daemonize xenstored before binding to xenstored socket
3) wait to close stdio in xenstored until we're ready to accept
connections (so that PID=`xenstored --output-pid` doesn't return until
it's ready to accept connections)
4) updates tools/misc/xend for these changes
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustycorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd padding to allocation bitmap. Should fix page fault
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 09:45:06 +0000 (09:45 +0000)]
Add padding to allocation bitmap. Should fix page fault
on x86/64 debug builds on some systems.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe following patch adds cramfs support to domU kernels so cramfs based
kaf24@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 09:09:15 +0000 (09:09 +0000)]
The following patch adds cramfs support to domU kernels so cramfs based
ramdisks can be used for initrds.

Signed-off-by: Sean Dague <sean@dague.net>
20 years agoInitialize the xenstore MFN for VMX domains
cl349@firebug.cl.cam.ac.uk [Wed, 10 Aug 2005 08:44:58 +0000 (08:44 +0000)]
Initialize the xenstore MFN for VMX domains
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 16:26:19 +0000 (16:26 +0000)]
merge?

20 years agoDo not suppress errors on writes outside transactions.
cl349@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 16:16:08 +0000 (16:16 +0000)]
Do not suppress errors on writes outside transactions.
Mike Wray made this change because xend's callbacks were failing
with EROFS, because a transaction was going on.  However, the
solution is to either block callbacks during transactions, or use
a different connection to the store.
We fail ex-transaction activity because it's not clear what the right
behaviour is: it allows deadlock if two people do it, and it implied
your transaction isn't rooted in the right place.

This hack caused the testsuite to fail (obviously), so as a result the
testsuite wasn't run very often.  This caused it to bitrot.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoDirectly including ../tools breaks building in separate object tree,
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 13:53:15 +0000 (13:53 +0000)]
Directly including ../tools breaks building in separate object tree,
as well as building from mkpatch patch (I believe Rik hit that one).
This puts xenstore headers in linux-public.

Signed-off-by: Chris Wright <chrisw@osdl.org>
20 years agoAdd missing LGPL license notice to python sources
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 13:17:37 +0000 (13:17 +0000)]
Add missing LGPL license notice to python sources
that didn't have them.

Signed-off-by: Mike Wray <mike.wray@hp.com>
20 years agoPAE PMDs must be made writable before freeing.
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 13:08:25 +0000 (13:08 +0000)]
PAE PMDs must be made writable before freeing.

20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 13:04:54 +0000 (13:04 +0000)]
merge

20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 13:04:31 +0000 (13:04 +0000)]
merge

20 years agoUpdates to SV. New look. Removed and simplified lots of files.
twilkie@paploo.uk.xensource.com [Tue, 9 Aug 2005 12:55:18 +0000 (12:55 +0000)]
Updates to SV. New look. Removed and simplified lots of files.

20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 12:51:06 +0000 (12:51 +0000)]
merge?

20 years agoThe following patch is a major restructuring of main.py to be more straight forward...
cl349@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 12:50:22 +0000 (12:50 +0000)]
The following patch is a major restructuring of main.py to be more straight forward, and remove as much code as possible.
It does a number of things:

* It implements the standardized options proposed via my RFC for xm
* It restructures the calling of these functions to be function pointers out
  of a dictionary, instead of subclasses found through inspection
* It consolidates all help info, making it easier to see that the help
  screen looks consistent across commands.  (Per command help isn't yet in
  this patch just global help)
* It moves object importing into the functions that require them only,
  allowing commands like "xm help" to be runable as non root
* It adds command aliasing to provide backwards compatibility with many
  commands (i.e. xm balloon)
* It provides more useful error messages is most fail cases
* It implements a short help by default (which takes < 24 screen lines) as
  requested by Mark W at OLS
* It attempts to trap more exceptions than before and provide useful errors
  based on them (this requires more testing)

This patch makes no changes to any other elements of xen/xm, and works with
all other objects and libraries as is.

Signed-off-by: Sean Dague <sean@dague.net>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoWhen building in separate object directory entry.o fails building
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 10:47:41 +0000 (10:47 +0000)]
When building in separate object directory entry.o fails building
because entry.S includes syscall_table.S but it's in the wrong
directory.  This simply adds the obj-dir to the include search path.

Signed-off-by: Chris Wright <chrisw@osdl.org>
20 years agoFixes for x86/64 writable pagetables, including SMP
kaf24@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 10:42:51 +0000 (10:42 +0000)]
Fixes for x86/64 writable pagetables, including SMP
guest support.

NOTE: I removed some x86/64 specific tests from get_page_type().
I can't see what good could come of them -- if they caused
things to work then I'm pretty sure there must be some underlying
bug that is what ought to be fixed.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRestore suspend/resume calls for the control interface on suspend/resume.
cl349@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 09:34:06 +0000 (09:34 +0000)]
Restore suspend/resume calls for the control interface on suspend/resume.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoDon't expose xenstore daemon-only permission bits through python bindings.
cl349@firebug.cl.cam.ac.uk [Tue, 9 Aug 2005 08:44:29 +0000 (08:44 +0000)]
Don't expose xenstore daemon-only permission bits through python bindings.
These bits are daemon-only, never come though to userspace.  We already
changed them once and broke compilation: better they had never been
referenced.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoSimple fix to getdomaininfo cpu_time calculation for
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 18:43:57 +0000 (18:43 +0000)]
Simple fix to getdomaininfo cpu_time calculation for
multi-vcpu guests. From Josh Triplett.

20 years agoFix page_to_phys() macro as suggested by Gerd.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 17:00:21 +0000 (17:00 +0000)]
Fix page_to_phys() macro as suggested by Gerd.

20 years agoThat one is obviously needed to make pae xen-linux work with
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 16:51:02 +0000 (16:51 +0000)]
That one is obviously needed to make pae xen-linux work with
more than 4GB.

20 years agoFix x86/64 xenlinux build. Remove stupid patch.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 14:39:29 +0000 (14:39 +0000)]
Fix x86/64 xenlinux build. Remove stupid patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix signedness issue in xenlinux timer interrupt handler.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 14:13:36 +0000 (14:13 +0000)]
Fix signedness issue in xenlinux timer interrupt handler.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoReally fix the x86/64 build. Get rid of push/pop from
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 12:31:04 +0000 (12:31 +0000)]
Really fix the x86/64 build. Get rid of push/pop from
scale_delta().
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix the x86/64 build.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 12:07:19 +0000 (12:07 +0000)]
Fix the x86/64 build.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove dead file.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 11:10:54 +0000 (11:10 +0000)]
Remove dead file.

20 years agoRemove dead files.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 11:06:45 +0000 (11:06 +0000)]
Remove dead files.

20 years agoFix both Xen and XenLinux to correctly handle 64-bit
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 10:59:22 +0000 (10:59 +0000)]
Fix both Xen and XenLinux to correctly handle 64-bit
time deltas. Good for robustness and future-proofing.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years ago1) More testing: include tests which I forgot in previous patch, remove
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 09:13:19 +0000 (09:13 +0000)]
1) More testing: include tests which I forgot in previous patch, remove
xs_watch_stress, reduce cycles in "make check" random test.
2) xs_crashme: corrupt random packets going to xenstored, watch it
crash.
3) Handle second input from before we finished output on first one.
4) Fix bug where one-arg operations are given zero args.
5) Fix bug where SET_PERMS fails after blocking on transaction.
6) Fix memory leak when DIRECTORY op given no argument.
7) Fail on first memory leak, for better testing.
8) Fix missing waiting_for_ack initialization for new connections.
9) Ensure all input and output is handled for domains so we don't stall.
10) Fix overrun bug in xs_count_strings on non-nul-terminated strings.
11) New test for clients which write without waiting for response.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 years agoFix hw_resend_irq() -- IRQ_PENDING must be propagated back
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 09:12:22 +0000 (09:12 +0000)]
Fix hw_resend_irq() -- IRQ_PENDING must be propagated back
to evtchn_pending[] bit during irq_enable, or the delayed
callback may never happen.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe attached patch adds -Werror to HOSTCFLAGS in Config.mk, makes
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 08:32:52 +0000 (08:32 +0000)]
The attached patch adds -Werror to HOSTCFLAGS in Config.mk, makes
xen/tools actually use HOSTCFLAGS (it was already using HOSTCC), and
fixes some gcc-4.0 signedness warnings in xen/tools/symbols.c.

Signed-off-by: Josh Triplett <josht@us.ibm.com>
20 years agoAttached is a patch to x86_64 xenlinux. It also includes cleanups. We
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 08:18:38 +0000 (08:18 +0000)]
Attached is a patch to x86_64 xenlinux. It also includes cleanups. We
are also working on SMP + writable pagetable support now.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoWritable pagetables for x86/64. Xen portion.
kaf24@firebug.cl.cam.ac.uk [Mon, 8 Aug 2005 08:18:06 +0000 (08:18 +0000)]
Writable pagetables for x86/64. Xen portion.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoReally include renamed console files. :-)
kaf24@firebug.cl.cam.ac.uk [Sun, 7 Aug 2005 09:13:39 +0000 (09:13 +0000)]
Really include renamed console files. :-)
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRename console binaries to xenconsole and xenconsoled.
kaf24@firebug.cl.cam.ac.uk [Sun, 7 Aug 2005 09:12:55 +0000 (09:12 +0000)]
Rename console binaries to xenconsole and xenconsoled.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agothis patch fixes X86_64 Xorg Xfree86 issues.
kaf24@firebug.cl.cam.ac.uk [Sun, 7 Aug 2005 08:56:57 +0000 (08:56 +0000)]
this patch fixes X86_64 Xorg Xfree86 issues.
Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix perfc_defn.h to allow multiple inclusion.
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 15:47:20 +0000 (15:47 +0000)]
Fix perfc_defn.h to allow multiple inclusion.

20 years agoxend prints out some messages when starting, which is annoying. This
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 15:45:41 +0000 (15:45 +0000)]
xend prints out some messages when starting, which is annoying. This
patch send those to xend log file instead - people want them always
know where to find them.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
20 years agoMore time-interface fixes.
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 15:24:22 +0000 (15:24 +0000)]
More time-interface fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix xenbus_read() usage in shutdown handler.
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 09:54:57 +0000 (09:54 +0000)]
Fix xenbus_read() usage in shutdown handler.

20 years ago- include linux/vmalloc.h for vmalloc
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 09:52:01 +0000 (09:52 +0000)]
- include linux/vmalloc.h for vmalloc
- include grant table includes from common.h rather than blkback.c,
  since both C files use grant tables
- include linux/version.h from block.h (a macro there uses it)
- include asm-xen/hypervisor.h from block.h (virt_to_machine)

Signed-off-by: Matthew Chapman <matthewc@hp.com>
20 years agoThis patch changes the vcpu-hotplug handler from using control message
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 09:50:51 +0000 (09:50 +0000)]
This patch changes the vcpu-hotplug handler from using control message
over to using xenstore for triggers.  Dropping the control messages also
fixes the issue with not being able to use xm vcpu-hotplug on dom0.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoThis patch changes the probe notifier, per Rusty's suggestion. It
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 09:49:22 +0000 (09:49 +0000)]
This patch changes the probe notifier, per Rusty's suggestion.  It
also converts the balloon driver to use the notifier structure, and
removes the root-watch workaround.

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoThis patch changes the shutdown driver and xend to use strings instead
kaf24@firebug.cl.cam.ac.uk [Sat, 6 Aug 2005 09:48:47 +0000 (09:48 +0000)]
This patch changes the shutdown driver and xend to use strings instead
of codes for signaling a shutdown request.

Also, we fix the return code for the shutdown notifier, so other
notifiers will get to run ;)

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoFix mach2phys table allocation for 32-bit PAE Xen.
kaf24@firebug.cl.cam.ac.uk [Fri, 5 Aug 2005 15:11:46 +0000 (15:11 +0000)]
Fix mach2phys table allocation for 32-bit PAE Xen.
Found by Gerd Knorr.

20 years agoFix xtime_lock handling to avoid deadlock in sched_clock().
kaf24@firebug.cl.cam.ac.uk [Fri, 5 Aug 2005 14:57:43 +0000 (14:57 +0000)]
Fix xtime_lock handling to avoid deadlock in sched_clock().
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoNo need to define errno defined at the top of reboot.c.
kaf24@firebug.cl.cam.ac.uk [Fri, 5 Aug 2005 09:53:04 +0000 (09:53 +0000)]
No need to define errno defined at the top of reboot.c.
err2 is only needed when CONFIG_MAGIC_SYSRQ is defined.

Signed-off-by: Li Xin <xin.b.li@intel.com>
20 years agoxenstored has had a testsuite for some time. This splits the test
kaf24@firebug.cl.cam.ac.uk [Fri, 5 Aug 2005 09:04:01 +0000 (09:04 +0000)]
xenstored has had a testsuite for some time.  This splits the test
targets into "make -s check" (the GNU standard) which is designed to run
in several seconds or less, with only "<dirname>:" and a seried of "."
for output, and "make fullcheck" which is more verbose and complete, and
runs in minutes.

I plan to submit a patch to plumb these tests in at the top level soon,
with the idea of having a "make -s check" which you can reasonable run
every checkin (time make check << time make), and a "make fullcheck"
which you can run after significant changes.

This patch speeds up testing by making tests one single "xs_test"
script, enhancing xs_test with a simple "expect" command.  It also only
runs the "high value" tests under "make check", and leaves the rest for
"make fullcheck".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>